/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BO;

import BO.Iter.GiaoVienBO;
import DAO.Iter.GiaoVienDAO;
import TableModel.Giaovien;
import TableModel.Hocphan;
import java.util.List;


/**
 *
 * @author vt
 */

public class GiaoVienBOImpl implements GiaoVienBO {

    private GiaoVienDAO gvDao;
    private Giaovien bean;

   
  
  
    public void update(Giaovien b){
        gvDao.update(b);
    }
     public void add(Giaovien b){
        gvDao.add(b);
    }
     public Giaovien getBean() {
        return bean;
    }
    
    public GiaoVienDAO getGvDao() {
        return gvDao;
    }

    public void setGvDao(GiaoVienDAO gvDao) {
        this.gvDao = gvDao;
    }
    

   
    public void delete(Giaovien a) {
       gvDao.delete(a);
    }
    public void setBean(Giaovien bean) {
        System.out.println("SetBean : "  + bean.toString());
        this.bean = bean;
    }
  @Override
    public List<Giaovien> listAllGiaoVien() {
        return gvDao.findAllGiaoVien();
    }


    @Override
    public Giaovien findGiaoVienById(String id) {
        return gvDao.findGiaoVien(id);
    }
/**
     * thuc hien lay het tat ca cac hoc phan ma giao vien nay chiu trach nhiem
     * cac mon nay duoc chia ra theo hoc ky sap xep theo ten 
     * @param idgiaovien
     * @return 
     */
    @Override
    public List<Hocphan> listAllHocPhan(String idgiaovien) {
        return gvDao.listHocPhan(idgiaovien);
    }
}
